<html>
<body>
<h2>He! <script>document.write(new Date().toLocaleString())</script></h2>

springmvc upload
<form name="form1" action="/manage/product/upload.do" method="post" enctype="multipart/form-data">
    <input type="file" name="upload_file" />
    <input type="submit" value="springmvc upload file" />
</form>

springmvc richtext_img_upload
<label for="form1">Upload</label>
<form name="form1" action="/manage/product/richtext_img_upload.do" method="post" enctype="multipart/form-data">
    <input type="file" name="upload_file" />
    <input type="submit" value="richtext upload file" />
</form>

<label for="form1">Login</label>
<div name="input">
    <span>username:</span> <input type="text" id="username" autocomplete="off" />
    <span>password:</span> <input type="password" id="pwd" autocomplete="off" />
    <button onclick="loginForm()">login</button>
    <button type="reset">reset</button>
</div>

<div id="txt" style="margin: 20px; font-size: 14px;word-break: break-word;"></div>

<script>
    const dom = id => document.querySelector(`#`+id)
    setTimeout(t => {
        dom('username').value = dom('pwd').value = ''
    }, 800)
    const url = 'http://localhost:8088/user/login.do'
    const loginForm = log => {
        const testRequest = new Request(url, {
            method: 'post',
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
            },
            body: `username=`+dom('username').value+`&password=`+dom('pwd').value
        })
        fetch(testRequest).then(res => {
            console.log(res)
            let result = res.json()
            result.then(data => {
                console.log(data)
                dom("txt").innerHTML = JSON.stringify(data)
            })
        })
    }
</script>
</body>
</html>
